package com.tvunetworks.center.user.service;

import com.tvunetworks.center.user.model.RoleFeature;

import java.util.List;

/**
 * @author Etan Yang
 * @data: 2021/4/7 17:32
 * @program: tvucc-aggregator
 * @description:
 */

public interface RoleFeatureService {
    /**
     * 批量添加roleFeature
     * @param permissions permissions
     * @return int
     */
    int batchAddRoleFeature(List<RoleFeature> permissions);

    /**
     * 根据roleId和featureIds批量删除Role Feature
     * @param roleId roleId
     * @param featureIds featureIds
     */
    void batchDeleteByRoleIdAndFeatureIds(String roleId, List<String> featureIds);

    /**
     * 根据roleId获取所有的RoleFeature集合
     * @param roleId roleId
     * @return List
     */
    List<RoleFeature> getByRoleId(String roleId);

    /**
     * 根据roleId删除RoleFeature
     * @param roleId roleId
     * @return int
     */
    int deleteByRoleId(String roleId);
}
